1. Field of the Invention
The present invention relates to a method and an apparatus for picking and operating on a data object on a video display and for clipping unwanted portions from a data object displayed on a video display.
2. Description of Prior Art
Picking is a descriptive term used in general for describing methods and apparatus involving the selection of a data object from among a plurality of objects appearing on a video display. Once an object has been picked, it can be operated on in any one of a variety of fashions. For example, it could be moved, changed in size or color, removed from the display, etc.
One of the methods used to produce an object on a video display is to produce the object from pixels in a bit map. The objects are drawn in the bit map in response to the execution of a plurality of instructions. For example, to draw a line in a bit map, a graphics controller is typically provided with the X and Y coordinates of the end points of the line. Thereafter, a set of instructions, called a display list, calculates and stores the location of each of the intermediate pixels required to be displayed between the end points of the line in the bit map. For more complicated objects, more complex algorithms are used which generally require a proportionally larger number of instructions. After the objects are stored in the bit map, the bit map is scanned row by row to display the objects on the video display.
An advantage of using a bit map is that there is no need to re-execute the display list to reproduce the objects on the video display and, therefore, the CPU used to produce the bit map is thereafter free to perform other operations.
A disadvantage of the above-described method of producing objects on a display using a bit map is that once all of the objects are drawn in the bit map, the identity of the individual objects is lost. For example, if a circle and a triangle are drawn in the bit map, they simply appear as streams of pixels in the bit map. Therefore, when picking an object from a display using a pointer in a conventional apparatus which uses a bit map, there is no means provided for separately processing the objects in the bit map without re-executing the entire display list associated therewith. In the past, as will be further described below, this has required an undesirable amount of CPU time even in systems which employed a direct memory access (DMA) circuit for loading display lists in a graphics microprocessor.
Another method used for displaying objects in a display list on a video display, but which does not require the use of a bit map, is a method and apparatus which continually refreshes a video display by continually re-executing the display list. Such a method is often called a stroke method or a vector stroke method.
Picking in a vector stroke method is typically accomplished by placing a pointer, such as a cursor, on, near or within the boundaries of a selected data object on the display. Thereafter, as the display list is re-executed, a match is made between the coordinates of the cursor and the coordinates of one or more pixels in the data object. The match generates a pick interrupt signal. Since the CPU at the time that the pick interrupt signal occurs is in the process of re-executing the display list of the data object that generated the pick interrupt signal, the data object is readily identified and can be operated on in any one of the variety of ways described above.
A disadvantage of picking in a conventional vector stroke method is that each data object is redrawn separately and that when a match occurs between the coordinates of a pointer and the coordinates of one or more pixels in a selected data object, a predetermined period of time is required before the pick interrupt signal is generated and transmitted to the CPU. As a consequence, picking in a conventional vector stroke method requires that the CPU wait said predetermined period of time after re-executing each display list in preparation for receiving a possible pick interrupt signal. In applications involving many display lists, the accumulation of lost CPU time can, therefore, be significant.
Another disadvantage of the vector stroke method is that, without a bit map, there is no permanent record of the data objects displayed.
Clipping is a descriptive term used in general for describing a method and apparatus for displaying a data object on a video display, portions of which are clipped according to some predetermined criteria. For example, a typical prior known method and apparatus used for clipping a data object comprised the use of a regular geometrical shape, such as a square, rectangle, circle, etc. When using the regular geometrical shape for clipping, it was the practice to calculate the intersection points of the data object to be displayed with the boundaries of the geometrical shape. Thereafter, all portions of the data object which lay outside the boundaries were discarded. Alternatively, all portions of the data object which lay inside the boundaries could be discarded, leaving the portions outside the boundaries to be displayed.
A disadvantage of the prior known methods and apparatus used for clipping was that they required solving a system of equations, corresponding software and a large amount of CPU computation time. Moreover, the boundary criteria was generally limited to some regular geometrical shape since irregular geometrical shapes were not easily defined.